package cn.service;

import java.util.List;

import cn.mapper.GoodsMapper;
import cn.mapper.GoodsMapperImp;
import cn.pojo.Buy;
import cn.pojo.Goods;

public class GoodsServiceImp implements GoodsService {
	private GoodsMapper goodsMapper = new GoodsMapperImp();

	@Override
	public int totalCount(String goodsName) {
		return goodsMapper.totalCount(goodsName);
	}

	@Override
	public List<Goods> getGoodsLike(String goodsName, Integer rowNum, int pagecount) {
		return goodsMapper.getGoodsLike(goodsName, rowNum, pagecount);
	}

	@Override
	public int toAddGoods(Buy b) {
		// TODO Auto-generated method stub
		return goodsMapper.toAddGoods(b);
	}

	@Override
	public Goods getGoodsByid(String id) {
		return goodsMapper.getGoodsByid(id);
	}

	@Override
	public List<Buy> getBuyLike(String productName, Integer rowNum, int pagecount) {
		return goodsMapper.getBuyLike(productName, rowNum, pagecount);
	}

	@Override
	public int totalCountByBuy(String productName) {
		// TODO Auto-generated method stub
		return goodsMapper.totalCountByBuy(productName);
	}

	@Override
	public List<Buy> getBuyByid(String[] id) {
		return goodsMapper.getBuyByid(id);
	}

	@Override
	public Integer[] deleteBatch(String[] id) {
		return goodsMapper.deleteBatch(id);
	}

	@Override
	public int buyRemove(String id) {
		return goodsMapper.buyRemove(id);
	}

	@Override
	public Integer[] deleteBuy(String[] id) {
		return goodsMapper.deleteBuy(id);
	}

}
